<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css input radio实现手风琴效果</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
            box-sizing: border-box;
        }

        li {
            width: 500px;
        }

        li+li {
            border-top: 1px solid #eee;
        }

        input {
            display: none;
        }

        input:checked~section {
            height: 300px;
        }

        label {
            display: block;
            background: #86ED60;
            height: 50px;
            line-height: 50px;
        }

        section {
            height: 0;
            background: #EDE160;
            transition: height .3s;
            overflow: hidden;
        }
    </style>
</head>
<body>
<ul>
    <li>
        <input type="radio" name="menu" id="menu1">
        <label for="menu1">菜单1</label>
        <section>内容1</section>
    </li>
    <li>
        <input type="radio" name="menu" id="menu2">
        <label for="menu2">菜单2</label>
        <section>内容2</section>
    </li>
    <li>
        <input type="radio" name="menu" id="menu3">
        <label for="menu3">菜单3</label>
        <section>内容3</section>
    </li>
</ul>
</body>
</html>